package cn.tedu.process.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class KafkaConfig {

    /**
     * 警告对列
     * @return
     */
    @Bean
    public NewTopic warningChargingTopic() {
        return new NewTopic("warningChargingTopic", 1, (short) 1);
    }


    /**
     * 停止充电队列
     * @return
     */
    @Bean
    public NewTopic errorChargingTopic() {
        return new NewTopic("errorChargingTopic", 1, (short) 1);
    }

    /**
     * 充电数据队列会被flink订阅
     * @return
     */
    @Bean
    public NewTopic chargingData() {
        return new NewTopic("chargingDataTopic", 1, (short) 1);
    }
}
